#ifndef TITLEBAR_H
#define TITLEBAR_H
class QMouseEvent;
#include <QWidget>
namespace Ui {
class Titlebar;
}

class Titlebar : public QWidget
{
    Q_OBJECT

public:
    explicit Titlebar(QWidget *parent = 0);
    ~Titlebar();

    void mouseMoveEvent(QMouseEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
signals:
    void signal_push_move_event(QPoint p1,QPoint p2);

private:
    bool m_bLeftButtonPress;
    bool m_bLeftButtonMove;
    QPoint m_ptPress;
    QPoint m_ptMove;
};

#endif // TITLEBAR_H
